/**
 * Created by .
 * User: Administrator
 * Date: 12/17/14
 * Time: 4:46 PM
 * To change this template use File | Settings | File Templates.
 */
$(document).ready(function() {
	$('.town-change-block div').click(function () {
		if (!$(this).hasClass('active')) {
			var rel = $(this).attr("rel");
			changeTown(rel);

			$(".menu").removeClass("on");
			if (rel == 'city1') {
				$('.menu.moscow').addClass("on");
			} else {
				$('.menu.surgut').addClass("on");
			}
			$(".city").hide();
			$("div."+rel).show();
			if (map) initialize();
			return false;
		}
	});
});